/* 
    该文件专门为Count组件生成 action对象
*/

import {JIA,JIAN} from '../constant'

export const increment = (data) => ({type:JIA, data})
export const decrement = (data) => ({type:JIAN, data})

export const incrementAsync = (data,time) => {
    return (dispatch) =>{
        setTimeout(()=>{
            dispatch(increment(data))
        },time)
    }
}